package cn.iocoder.springboot.lab32.springmvc.controller;

import cn.iocoder.springboot.lab32.springmvc.vo.UserVO;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.UUID;

@RestController
@RequestMapping("/test")
@CrossOrigin(origins = "*", allowCredentials = "true")
public class TestController {

    @GetMapping("/get")
    @CrossOrigin(allowCredentials = "false")
    public UserVO get() {
        return new UserVO().setId(1).setUsername(UUID.randomUUID().toString());
    }
}
